import  request  from "@/utils/service.js";


//查询所有数据
export let fangzi = () => {
    return request({
        url: "/house/getHouseList",
        method: "GET"
    })
}


//添加数据
export let addfz = (houseImg,houseNum,houseArea,houseStatus="0") => {
    return request({
        url: "/house/addHouse",
        method: "POST",
        data: {
          houseImg,houseNum,houseArea,houseStatus
        }
    })
}

//删除数据
export let del = (id) => {
    return request({
        url: "/house/deleteHouse/" + id,
        method: "DELETE",
    })
}
//更新数据
export let afffz = (houseImg,houseNum,houseArea,id) => {
    return request({
        url:"/house/updateHouse",
        method: "PUT",
        data: {
            houseImg,houseNum,houseArea,id
          }
    })
}